<template>
  <!-- <nav>
    <router-link to="/">login</router-link> |
    <router-link to="/home">Home</router-link> |
    <router-link to="/about">About</router-link>
  </nav> -->
  <router-view/>
  <MsgTip ref='msgTip'></MsgTip>
</template>

<script>
	import MsgTip from "@/components/MsgTip"
	export default{
		components:{
			MsgTip
		},
		mounted() {
			this.$eventBus.$on("onError", (msg) => {
				this.$refs.msgTip.showMsg(msg);
			});
		},
		unmounted() {
			this.$eventBus.$off("onError");
		},
		methods: {}
	}
</script>

<style lang="scss">
#app {
  height: 100%;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
